package com.jiazhong.basic;

import lombok.SneakyThrows;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;

public class Main {
    @SneakyThrows
    public static void main(String[] args) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime localDate = LocalDateTime.parse("2025-08-25 11:20:20", formatter);
        Date date = Date.from(localDate.atZone(ZoneId.systemDefault()).toInstant());

        System.out.println(date);
    }
}